/**所有上传接口/和解析图片接口**/
import axios from "axios";
import service from "@/config/index";

// 解析图片
async function parsePicture (data) {
  let response = await axios.post(
    `${service.serviceUser}/photoRecognized/businessLicense`,
    data
  );
  return response;
}

// 上传图片通用接口
async function uploadPicture (data) {
  let response = await axios.post(`${service.serviceBasic}/upload`, data);
  return response;
}

// 证书服务--上传接口
async function uploadCertFile (data, type) {
  let response = await axios.post(`${service.serviceCert}/cert/upload/${type}`, data);
  return response;
}

// 自定义
async function save (data) {
  let response = await axios.post(`/menu/resource/save`, data);
  return response;
}

export { parsePicture, uploadPicture, uploadCertFile, save };
